export const jointAppKey = {
    dev: 'oqM7asRJzefjj8o4',
    uat: 'EG2bZrTau6nRB31z',
    prod: 'xSUTRzukWxXy77j9',
} as const

export function getBaseEnv() {
    const hostname = window.location.hostname
    let target = 'prod'
    if (hostname.includes('localhost') || hostname.includes('test-')) {
        target = 'dev'
    }
    else if (hostname.includes('uat-')) {
        target = 'uat'
    }

    return target
}

export const getAppKey = () => jointAppKey[getBaseEnv()]
